// $Id: Qt.cpp 82 2007-11-12 10:04:04Z wimleers $


/**
 * Piece definition file.
 *
 * @file Piece.cpp
 * @author Bram Bonn&eacute;
 */


#include "Piece.h"
#include "InternalException.h"

/**
 * Geeft de tegengestelde kleur terug.
 */
Color Piece::GetOther() const {
	if (m_color == WHITE)
		return BLACK;
	else if (m_color == BLACK)
		return WHITE;
	else if (m_color == EMPTY)
		return EMPTY;
	else
		throw(InternalException("Piece::GetOther()", "Kleur was niet black, white of empty"));
}
